const mutations = {
	logon(state,user) {
		state.isLogged = true
		state.user = user
//		if(user.customerInfo.nickname){
//			state.name.content = user.customerInfo.nickname
//			state.name.type = 'nickname'
//		}else if(user.customerInfo.userName){
//			state.name.content = user.customerInfo.userName
//			state.name.type = 'userName'
//		}else if(user.customerInfo.mobile){
//			state.name.content = user.customerInfo.mobile
//			state.name.type = 'mobile'
//		}else if(user.customerInfo.email){
//			state.name.content = user.customerInfo.email
//			state.name.type = 'email'
//		}
		cookie().set('user',user)
	},
	logout(state) {
		cookie().del('user')
		state.isLogged = false
		state.name.type = ''
		state.name.content = ''
	},
	logchange(state,bool) {
		state.isLogged = bool
	}
}
export default mutations